SRC = showheaders.l
CC = gcc
LEX = flex
LEX_FLAGS = -d

all: a.out

a.out: lex.yy.c
	$(CC) lex.yy.c

lex.yy.c: $(SRC)
	$(LEX) $(LEX_FLAGS) $(SRC)

clean:
	@-rm lex.yy.c a.out showheaders.ps showheaders.pdf

print: showheaders.pdf

showheaders.pdf: showheaders.ps
	ps2pdf showheaders.ps

showheaders.ps: $(SRC)
	a2ps -o showheaders.ps $(SRC)
